require 'extract/json_extractor'

service_name = ARGV[0]
conditions = ARGV[1]

require "extract/rules/#{service_name}_rules"

rules = Object.const_get(:Extract).const_get("#{service_name.capitalize}Rules").instance

extractor = Extract::JsonExtractor.new :service_name => service_name, :rules => rules, :conditions => conditions 
extractor.extract_all
